﻿using System;
using System.IO;
using System.Net;
using System.Text;
using System.Web;
using System.Text.RegularExpressions;
using System.Collections.Generic;


namespace Galoap
{

    /// <summary>
    ///  This class is used for interrogate Tanl and receive the semantic informations about the phrase
    /// </summary>
    abstract public class ParserInterrogator
    {
        /// <summary>
        /// The site of the text analyzer
        /// </summary>
        abstract public string site { get; set; }

        /// <summary>
        /// the phrase to ask
        /// </summary>
        abstract public string phrase{get; set;}

        /// <summary>
        /// Ask to Tanl to make the part-of-speech for the phrase 'phrase'
        /// </summary>
        /// <returns>a list of triple ontology of type part-of-speech for that phrase</returns>
        abstract public Ontology[] PartOfSpeechRequest();

        /// <summary>
        /// Ask Tanl to make the first semantic tree of the phrase phrase
        /// </summary>
        /// <returns>the semantic tree of the phrase phrase of index i</returns>
        abstract public Tree SemanticTreeRequest();


        /// <summary>
        /// Ask Tanl to make the i-th semantic tree of the phrase phrase
        /// </summary>
        /// <param name="index">the index of the table for this phrase which we want from the parser</param>
        /// <returns>the semantic tree of the phrase phrase of index i</returns>
        abstract public Tree SemanticTreeRequest(int index);


        /// <summary>
        /// Ask Tanl to give the first num semantic tree of the phrase phrase
        /// </summary>
        /// <param name="num">the number of tables we want</param>
        /// <returns>list of tree of the phrase</returns>
        abstract public Tree[] SemanticTreesRequest(int num);
     


        /// <summary>
        /// Ask Tanl to make the first semantic tree of the phrase phrase
        /// </summary>
        /// <returns>list of ontology representing the first semantic tree of the phrase</returns>
        abstract public Ontology[] SemanticOntologyTreeRequest();


        /// <summary>
        /// Ask Tanl to make the i-th semantic tree of the phrase phrase
        /// </summary>
        /// <param name="index">the index of the table for this phrase which we want from the parser</param>
        /// <returns>list of ontology representing the semantic tree of the phrase of index i</returns>
        abstract public Ontology[] SemanticOntologyTreeRequest(int index);

        /// <summary>
        /// Ask Tanl to give the first num semantic tree of the phrase phrase
        /// </summary>
        /// <param name="num">the number of tables we want</param>
        /// <returns>list of ontology representing the semantic tree of the phrase</returns>
        abstract public Ontology[][] SemanticOntologyTreesRequest(int num);
        

        /// <summary>
        /// This method generate the a Tree from the list of ontology
        /// </summary>
        /// <param name="l">the list of Ontology to convert in Tree</param>
        /// <returns>create a Tree from the list of ontology </returns>
        abstract public Tree CreateSemanticTree(Ontology[] l);
    }
}
